import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';

export const columns: BasicColumn[] = [
    {
    title: 'rackName',
    dataIndex: 'rackName'
   },
   {
    title: 'pid',
    dataIndex: 'pid'
   },
   {
    title: '舱段1,载荷2,子系统3',
    dataIndex: 'rackType'
   },
   {
    title: '排序',
    dataIndex: 'sort'
   },
   {
    title: '载荷标识',
    dataIndex: 'rackCode'
   },
   {
    title: '编码长度,16进制',
    dataIndex: 'codeLength'
   },
   {
    title: '上行标识',
    dataIndex: 'upRackCode'
   },
   {
    title: '在线状态',
    dataIndex: 'onlineStatus'
   },
   {
    title: 'keySubSys',
    dataIndex: 'keySubSys'
   },
   {
    title: '是否置灰',
    dataIndex: 'disabled'
   },
];

export const searchFormSchema: FormSchema[] = [
 {
    label: 'rackName',
    field: 'rackName',
    component: 'Input'
  },
 {
    label: 'pid',
    field: 'pid',
    component: 'Input'
  },
];

export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  {label: '', field: 'id', component: 'Input', show: false},
  {
    label: 'rackName',
    field: 'rackName',
    component: 'Input',
  },
  {
    label: 'pid',
    field: 'pid',
    component: 'Input',
  },
  {
    label: '舱段1,载荷2,子系统3',
    field: 'rackType',
    component: 'Input',
  },
  {
    label: '排序',
    field: 'sort',
    component: 'InputNumber',
  },
  {
    label: '载荷标识',
    field: 'rackCode',
    component: 'Input',
  },
  {
    label: '编码长度,16进制',
    field: 'codeLength',
    component: 'Input',
  },
  {
    label: '上行标识',
    field: 'upRackCode',
    component: 'Input',
  },
  {
    label: '在线状态',
    field: 'onlineStatus',
    component: 'Input',
  },
  {
    label: 'keySubSys',
    field: 'keySubSys',
    component: 'Input',
  },
  {
    label: '是否置灰',
    field: 'disabled',
    component: 'Input',
  },
];
